package com.markus.code.图.图2;

import java.util.List;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/31 13:05
 * todo:
 */
public class GraphTpSortClient {
    public static void main(String[] args) {
        int [][]matrix = {{100,1,2},{100,1,3},{100,2,4},{100,3,4},{100,3,5}};
        Graph graph = GraphGenerator.generator(matrix);
        GraphTopologySort sort = new GraphTopologySort();
        List<Node> nodes = sort.topologySort(graph);
        for (Node node : nodes) {
            System.out.print(node.value+" ");
        }
    }
}
